package com.fuqi.framework.exception;

import com.android.volley.NetworkResponse;

public class HttpStatusException extends ApiException {

    /**
     *
     */
    private static final long serialVersionUID = -4539924874408411300L;
    private final NetworkResponse response;
    private final int statusCode;

    public HttpStatusException(int paramInt) {
        this(paramInt, null);
    }

    public HttpStatusException(int paramInt, NetworkResponse paramHttpResponse) {
        super("statusCode=" + paramInt);
        this.statusCode = paramInt;
        this.response = paramHttpResponse;
    }

    public NetworkResponse getResponse() {
        return response;
    }

    public String getResponseString() {
        if (response == null) {
            return "";
        }
        return response.toString();
    }

    public int getStatusCode() {
        return statusCode;
    }
}
